<!--/**
*菜单栏组件*
*
* @author LWG
* @date 2022/8/10 13:45
* @since 1.0.0
*/-->
<template>
  <el-tiptap :extensions="extensions" v-model="form.content"></el-tiptap>
</template>

<script>
import {
  ElementTiptap,
  // necessary extensions
  Doc,
  Text,
  Paragraph,
  Heading,
  Bold,
  Underline,
  Italic,
  Strike,
  ListItem,
  BulletList,
  OrderedList
} from 'element-tiptap'
export default {
  name: 'ElementTiptap',
  data () {
    return {
      extensions: [
        new Doc(),// 必须项
        new Text(),// 必须项
        new Paragraph(),// 必须项
        new Heading({ level: 5 }),// 标题
        new Bold({ bubble: true }), // render command-button in bubble menu.加粗 bubble: true 在气泡菜单中渲染菜单按钮
        new Underline({ bubble: true, menubar: false }), // render command-button in bubble menu but not in menubar.下划线 bubble: true, menubar: false 在气泡菜单而不在菜单栏中渲染菜单按钮
        new Italic(),// 斜体
        new Strike(),// 删除线
        new ListItem(),// 使用列表必须项
        new BulletList(),
        new OrderedList()
      ]
    }
  }
}
</script>

<style></style>
